﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="order_Import.aspx.cs" Inherits="admin_order_order_Import" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register src="../usercontrol/category.ascx" tagname="category" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceLeft" Runat="Server">
    <uc1:category ID="category1" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="portlet x9">
    <div class=" portlet-header"><h4>Nhập hàng</h4></div>
    <div class=" portlet-content">
        <asp:Label ID="Label1" runat="server" Text="dsafdsfa"></asp:Label>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
       <ContentTemplate>
       
            <div class="adrow">
                    <div class="adlrow">Nhà cung cấp</div>
                
                    <div class="adrrow">
                        <asp:DropDownList ID="dropncc" runat="server" Width="205px" 
                            DataTextField="Supply_Name" DataValueField="Supply_Id">
                        </asp:DropDownList>
                    </div>
                </div>
                 <div class="adrow">
                    <div class="adlrow">Ngày nhập</div>
                    <div class="adrrow">
                        <asp:TextBox ID="txtngaynhap" Width="200px" runat="server"></asp:TextBox>
                        <asp:Calendar ID="Calngaynhap" runat="server" Width="150px" CellPadding="0" 
                            Height="150px"></asp:Calendar>
                    </div>
                </div>
            <div class="adrow">
                    <div class="adlrow">Tên sản phẩm</div>
                    <div class="adrrow">
                        <asp:DropDownList ID="DropTensp" runat="server" DataValueField="Products_Id" DataTextField="Products_Name" Width="205">
                        </asp:DropDownList>
                    </div>
                </div>
            <div class="adrow">
                    <div class="adlrow">Số lượng</div>
                    <div class="adrrow">
                        <asp:TextBox ID="txtsoluong" runat="server" Width="200px"></asp:TextBox>
                        
                    </div>
                </div>
            <div class="adrow">
                    <div class="adlrow">Giá</div>
                    <div class="adrrow">
                        <asp:TextBox ID="txtgia" runat="server" Width="200px"></asp:TextBox>
                      
                    </div>
                </div>
           
            <div class="adrow">
                    <div class="adlrow" ></div>
                    <div class="adrrow"  style="text-align: center">
                        <asp:Button ID="btnthem" runat="server" CssClass=" btn btn-small" Text="Thêm" onclick="btnthem_Click" />
                    </div>
            </div>
            <div class="adrow">
            <asp:ListView ID="Lisproducts" runat="server"  onitemdeleting="Lisproducts_ItemDeleting">
                <LayoutTemplate>
                         <div class ="pcartborder">
                       
                        <div class ="pcartrow header" style ="font-weight: bold;">
                            <div class ="pcartitemno">STT</div>
                            <div class ="prcol">Mã sản phẩm</div>
                            <div class ="pcol" style="width: 200px">Tên sản phẩm</div>
                            <div class = "prcol">Số lượng</div>
                             <div class = "prcol">Đơn vị tính</div>
                            <div class = "prcol">Đơn giá</div>
                            <div class="prcol"></div>
                        </div> 
                        
                                <asp:PlaceHolder runat="server" ID="itemPlaceholder" />
                     </div>
            </LayoutTemplate>
            <ItemTemplate>
                <div class="pcartrow" style=" border: solid 1px #e0e0e0">
                            <div class ="pcartitemno">
                                   <%# Container.DataItemIndex + 1 %>
                                </div>
                              
                                <asp:HiddenField ID="hdid" runat="server" Visible = "false"  Value = '<%#Eval("Id")+","+","+Eval("Name")+ Eval("Quantity")+","+Eval("Price")%>' />
                                <div class ="prcol">
                                   <%#Eval("Id")%>
                                </div>
                                <div class ="pcol" style=" width: 200px">
                                   <%#Eval("Name")%>
                                </div>
                                <div class = "prcol">
                                      <%#Eval("Quantity")%>
                                </div>
                                <div class = "prcol">
                                      <%#Eval("Unit")%>
                                </div>
                                 <div class = "prcol">
                                      <%#Eval("Price","{0:0,0}")+" vnđ"%>
                                </div>
                   
                                  <div class="pcartitemno">
                                    <asp:ImageButton ID=  "btnDelete"    CommandName = "Delete"  runat="server" OnClientClick = "return confirmdelete()" ImageUrl ="http://localhost:2011/didong/images/design/delete_on.gif"  AlternateText = "Del"  Width = "15" Height ="18"  ToolTip = "Xóa sản phẩm"/> 
                                  </div>
                                
                        
                        </div>
            
            </ItemTemplate>
            </asp:ListView>
            </div>
            <asp:Panel ID="Psumit" Visible="true" runat="server">
            <div style=" margin-top: 10px; text-align: center">
                 
                 <div style=" margin: 10px; padding-bottom:10px;display:inline; text-align:center"> 
                    <asp:Button UseSubmitBehavior="false"  CssClass="btn  btn-orange" 
                         runat="server" Text="  Lưu " 
                         BorderStyle="Solid" ID="btnluu" onclick="btnluu_Click"/>
                  <asp:Button ID="btnlamlai" UseSubmitBehavior="false"  CssClass="btn  btn-orange" 
                         runat="server" Text="Làm Lại" BorderStyle="Solid" onclick="btnlamlai_Click" 
                        />
                 
                </div>
                </div>
             </asp:Panel>
             </ContentTemplate>
            </asp:UpdatePanel>
    </div>

 </div>
</asp:Content>

